import { stringify } from 'qs';
import request from '@/utils/request';

export async function accountInfo(params) {
  return request(`/account/detail`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function withdrawRecord(params) {
  return request(`/account/withdraw/record`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function remove(params) {
  return request(`/ent/account/del/${params.key}`, {
    method: 'POST',
    body: {},
  });
}

export async function add(params) {
  return request('/ent/account/add', {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function updatePwd(params) {
  return request('/account/pwd/update', {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function tradePwd(params) {
  return request('/account/update/trade/pwd', {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function sendCode(params) {
  return request('/account/sms/send', {
    method: 'POST',
    body: {},
  });
}

export async function openAccount(params) {
  return request(`/account/open/${params.code}`, {
    method: 'POST',
    body: {},
  });
}
export async function delBackCard(params) {
  return request(`/account/card/unbind`, {
    method: 'POST',
    body: params,
  });
}
export async function bandBackCard(params) {
  return request(`/account/card/bind`, {
    method: 'POST',
    body: params,
  });
}
export async function bankList(params) {
  return request(`/account/bank/list`, {
    method: 'POST',
    body: params,
  });
}
export async function memberList(params) {
  return request(`/account/manager/list`, {
    method: 'POST',
    body: params,
  });
}

export async function Detail(params) {
  return request(`ent/account/detail/${params.accountNo}`, {
    method: 'POST',
    body: {},
  });
}

export async function enterpriseList(params) {
  return request('/account/enterprise/list', {
    method: 'POST',
    body: {},
  });
}
export async function enterpriseDetail(params) {
  return request(`/account/enterprise/detail/${params.code}`, {
    method: 'POST',
    body: params,
  });
}

export async function accountUpload(params) {
  return request(`/account/upload`, {
    method: 'POST',
    body: params,
  });
}

export async function accountData(params) {
  return request(`/account/data`, {
    method: 'POST',
    body: params,
  });
}
